<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/angular.min.js"></script>
	</head>

	<body ng-app="app" ng-controller="contro1">
		<table width="400" border="1">
			<tr>
				<td>编号</td>
				<td>名称</td>
				<td>价格</td>
			</tr>
			<tr ng-repeat="produce in produces">
				<td>{{$index+1}}</td>
				<td>{{produce.name}}</td>
				<td>{{produce.price}}</td>
			</tr>
		</table>
		<script type="text/javascript">
			//初始化
			var app1 =angular.module("app",[]);
			//定义模块
			app1.controller("contro1",["$scope",function($scope){
				
				$scope.produces=[
				{
				id:1001,
				name:"iPhone7",
				price:7500
				},
				{
				id:1002,
				name:"iPhone8",
				price:8500	
				}
				]
			}]);
			
			
		</script>
	</body>

</html>